package com.meituan.catering.management.order.biz.service;

import com.meituan.catering.management.common.exception.BizException;
import com.meituan.catering.management.common.model.biz.UserContextBO;
import com.meituan.catering.management.order.biz.model.CateringOrderDetailBO;
import com.meituan.catering.management.order.biz.model.request.*;

/**
 * 订单管理服务
 */
public interface CateringOrderBizService {

    /**
     * 创建订单
     *
     * @param userContextBO
     * @param placeCateringOrderBizRequest
     * @return
     * @throws BizException
     */
    CateringOrderDetailBO place(UserContextBO userContextBO, PlaceCateringOrderBizRequest placeCateringOrderBizRequest) throws BizException;

    /**
     * 针对一个订单制作
     *
     * @param userContextBO
     * @param prepareCateringOrderBizRequest
     * @return
     */
    CateringOrderDetailBO prepare(UserContextBO userContextBO, Long orderId, PrepareCateringOrderBizRequest prepareCateringOrderBizRequest) throws BizException;

    /**
     * 针对一个订单出餐
     *
     * @param userContextBO
     * @param orderId
     * @param produceCateringOrderBizRequest
     * @return
     */
    CateringOrderDetailBO produce(UserContextBO userContextBO, Long orderId, ProduceCateringOrderBizRequest produceCateringOrderBizRequest) throws BizException;

    /**
     * 针对一个订单进行加退菜
     *
     * @param userContextBO
     * @param orderId
     * @param adjustCateringOrderBizRequest
     * @return
     */
    CateringOrderDetailBO adjust(UserContextBO userContextBO, Long orderId, AdjustCateringOrderBizRequest adjustCateringOrderBizRequest) throws BizException;

    /**
     * 针对一个订单结账
     *
     * @param userContextBO
     * @param orderId
     * @param billCateringOrderBizRequest
     * @return
     */
    CateringOrderDetailBO bill(UserContextBO userContextBO, Long orderId, BillCateringOrderBizRequest billCateringOrderBizRequest);
}
